home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / ms.zip / ARC4_4.CHP < prev    next >
Text File  |  1993-06-15  |  3KB  |  85 lines

  1. %
  2. #EF
  3. #T15,1,Chapter 4     Animation     Pg. 9
  4. #HS,1,4,80,25,11,1
  5. #C4,R5
  6. ~Y~I
  7.                                     ~W~IMoving The World~Y~I
  8.  
  9. When writing 3D simulations, the ~R~Iworld~Y~I that the simulation moves in is
  10. defined as sets of points in |3D space|. Each object in the world is composed
  11. of ~C~Icollections of individual shapes~Y~I. Every shape is defined by its corners
  12. or ~M~Ivertices.~Y~I
  13.  
  14. #WN
  15. #C4,R13
  16. The object in Figure 4.3 on the next screen is a good example. The book in
  17. the figure is defined in 3D coordinates as a collection of six rectangles,
  18. each rectangle making up one surface of the book. To define the book in
  19. 3-space, we have defined the eight vertices ~S(0,0,0) (0,0,5) (10,0,0)
  20. (10,0,5) (0,20,0) (0,20,5) (10,20,0) (10,20,5).~s
  21.  
  22. #WN
  23. #Uarc4_4.exe
  24. %
  25. #EF
  26. #T15,1,Chapter 4     Animation     Pg. 10
  27. #HS,1,4,80,25,11,1
  28. #C4,R5
  29. ~Y~I
  30. The book can be moved (~M~Itranslated~Y~I), turned (~R~Irotated~Y~I), or ~C~Iscaled ~Y~Ijust by
  31. ~Kshifting the vertices around. If we want to look at the book from a
  32. different angle, what we actually do is to ~W~Imove the book, not ourselves.~Y~I~k
  33.  
  34. #WN
  35. An entire landscape can be simulated in the same manner. Each mountain,
  36. valley, car, or building in the landscape is a collection of arbitrary
  37. shapes called ~W~Ipolygons~Y~I. Each polygon is a surface composed of a
  38. collection of points that define its vertices. The polygons are grouped
  39. together into a single object, called a ~W~Isegment~Y~I. The book in Figure 4.3
  40. demonstrated this. Each surface of the book is a polygon. All of the
  41. polygons together make up a single segment. The segment itself represents
  42. an object.
  43.  
  44. #WN
  45. In a landscape, all of the polygons that make up the ground would be part
  46. of the same segment. Each mountain would be a segment with possibly hundreds
  47. of polygons in it. A car would also be a segment.
  48.  
  49. #WN
  50. #QQ,R,2
  51. A polygon is a group of ------ in
  52. 3D space.
  53. A polygon is a group of points.
  54. points,point,vertex,vertices
  55. #WP
  56. %
  57. #EF
  58. #T15,1,Chapter 4     Animation     Pg. 11
  59. #HS,1,4,80,25,11,1
  60. #C4,R5
  61. ~Y~I
  62. It's also possible to put ~C~Isegments in segments~Y~I. In high-powered programs it
  63. is often necessary. All of the polygons of a car door could be put into a
  64. single segment. The segment that makes up the door could then be included in
  65. the segment that makes up the car, along with the other polygons and
  66. segments that the car is composed of. In this way, we can build objects that
  67. are extremely complicated.
  68.  
  69. #WN
  70. As ~G~Iwe move ~Y~Ithrough a landscape, ~G~Iour point of view ~G~Irelative to the landscape
  71. ~G~Ichanges~Y~I. In other words, a scene looks different if we look at it from
  72. different spots or different angles. In the real world, you and I move
  73. through the landscape. In computerized simulations, ~R~Iwe move the landscape
  74. to accommodate us~Y~I. ~W~I~FThe world literally revolves around us.~Y~I~N
  75.  
  76. #WN
  77. If the world is moved fast enough, it appears to the viewer as if he/she is
  78. moving through the scene. This is exactly how flight simulator programs
  79. work.
  80.  
  81. #WN
  82. With this overview of animation, we're almost ready to begin writing games.
  83.  
  84. #WP
  85. #X